cmake_minimum_required(VERSION 2.8)

project(libUnitTest++)

include_directories(${EASYSQLITE_SRC_DIR})

aux_source_directory(src SOURCES)

if(WIN32)
    set(SOURCES ${SOURCES} src/Win32/TimeHelpers.cpp)
elseif(NOT WIN32)
    set(SOURCES ${SOURCES} src/Posix/TimeHelpers.cpp src/Posix/SignalTranslator.cpp)
endif()

aux_source_directory(../Tests TEST_SOURCES)

#set(HEADERS )

if(MSVC)
    add_definitions(-DUnitTest++_EXPORTS)
endif()

if(BUILD_SHARED_LIBS)
    add_library(UnitTest++ SHARED ${SOURCES} ${HEADERS})
    install(TARGETS UnitTest++ DESTINATION lib)
endif()

if(BUILD_STATIC_LIBS)
    add_library(UnitTest++_static STATIC ${SOURCES} ${TEST_SOURCES} ${HEADERS})
    set_target_properties(UnitTest++_static PROPERTIES OUTPUT_NAME "UnitTest++")
    install(TARGETS UnitTest++_static DESTINATION lib)
endif()

# install(FILES ${HEADERS} DESTINATION include)
